package com.ethan.http.convert;

import ma.glasnost.orika.CustomConverter;
import ma.glasnost.orika.MappingContext;
import ma.glasnost.orika.metadata.Type;
import qunar.api.pojo.Money;

/**
 * @author ethan
 * create 2018-04-11 下午7:32
 * desc
 **/
public class JavaBeanCustomConverter extends CustomConverter<Money,Money> {
    @Override
    public Money convert(Money source, Type<? extends Money> destinationType, MappingContext mappingContext) {
        return Money.of(source.getAmount());
    }
}
